/*
 * <p>Copyright ®Alyce_WX版权所有。</p>
 * 类名:ViewRoleRightDaoImpl
 * 创建人:alyce_wx
 * 创建时间:2017-03-30
 */
package com.wx.demo.wcd.infrastructure.dao.impl;

import java.util.Map;

import javax.annotation.Resource;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Repository;

import com.wx.demo.wcd.domain.pk.ViewRoleRightPK;
import com.wx.demo.wcd.domain.po.ViewRoleRightPO;
import com.wx.demo.wcd.domain.qo.ViewRoleRightQO;
import com.wx.demo.wcd.infrastructure.dao.ViewRoleRightDao;
import com.yjhl.framework.dao.AbstractDao;

/**
 * dao implement class for ViewRoleRight view
 *
 * @author alyce_wx
 * @see com.yjhl.framework.dao.AbstractDao
 * @see com.wx.demo.wcd.infrastructure.dao.ViewRoleRightDao;
 * @since 1.8
 * @version 1.0.0
 */

@Repository("viewRoleRightDao")
public class ViewRoleRightDaoImpl extends
		AbstractDao<ViewRoleRightPO, ViewRoleRightQO, ViewRoleRightPK>
		implements ViewRoleRightDao {
	/**
	 * spring SQL session
	 */
	@Resource
	private SqlSessionTemplate wcdSqlSessionTemplate;

	/**
	 * Get SQL session。 Get SQL session since spring auto wired.
	 *
	 * @return SQL session
	 * @see com.yjhl.framework.dao.AbstractDAO#getSqlSessionTemplate()
	 * @since 1.8
	 * @version 1.0.0
	 */
	@Override
	protected SqlSessionTemplate getSqlSessionTemplate() {
		return wcdSqlSessionTemplate;
	}

	/**
	 * 获取mybatis的命名空间。
	 *
	 * @return MyBatis的命名空间.
	 * @see com.yjhl.framework.dao.AbstractDAO#getNamespace()
	 * @since 1.8
	 * @version 1.0.0
	 */
	@Override
	protected String getNamespace() {
		return "wcdviewRoleRightDAO";
	}

	/**
	 * 获取不带"-"的UUID。
	 *
	 * @return 不带"-"的UUID.
	 * @see com.yjhl.framework.dao.AbstractDao#getSequence()
	 * @since 1.8
	 * @version 1.0.0
	 */
	@Override
	public String getSequence() {
		return null;

	}

	/**
	 * insert a ViewRoleRightPO
	 *
	 * @param entity
	 *            ViewRoleRightPO
	 * @return insert rows
	 * @see com.yjhl.framework.dao.AbstractDAO#insert(ViewRoleRightPO)
	 * @since 1.8
	 * @version 1.0.0
	 */
	@Override
	public int insert(ViewRoleRightPO entity) {
		throw new java.lang.IllegalArgumentException(
				"insert method not support for view object now!");
	}

	/**
	 * @see com.yjhl.framework.dao.AbstractDAO#updateByPk(ViewRoleRightPO)
	 */
	@Override
	public int updateByPk(ViewRoleRightPO entitywithpk) {
		throw new java.lang.IllegalArgumentException(
				"updateByPk method not support for view object now!");
	}

	/**
	 * @see com.yjhl.framework.dao.AbstractDAO#updateByPkWithBlobs(ViewRoleRightPO)
	 */
	@Override
	public int updateByPkWithBlobs(ViewRoleRightPO entitywithpk) {
		throw new java.lang.IllegalArgumentException(
				"updateByPkWithBlobs method not support for view object now!");
	}

	/**
	 * @see com.yjhl.framework.dao.AbstractDAO#update(ViewRoleRightPO,
	 *      ViewRoleRightQO)
	 */
	@Override
	public int update(ViewRoleRightPO entity, ViewRoleRightQO condition) {
		throw new java.lang.IllegalArgumentException(
				"update method not support for view object now!");
	}

	/**
	 * @see com.yjhl.framework.dao.AbstractDAO#updateByPkSelective(ViewRoleRightPO)
	 */
	@Override
	public int updateByPkSelective(ViewRoleRightPO entitywithpk) {
		throw new java.lang.IllegalArgumentException(
				"updateByPkSelective method not support for view object now!");
	}

	/**
	 * @see com.yjhl.framework.dao.AbstractDAO#updateByPkSelectiveWithBlobs(ViewRoleRightPO)
	 */
	@Override
	public int updateByPkSelectiveWithBlobs(ViewRoleRightPO entitywithpk) {
		throw new java.lang.IllegalArgumentException(
				"updateByPkSelectiveWithBlobs method not support for view object now!");
	}

	/**
	 * @see com.yjhl.framework.dao.AbstractDAO#updateSelective(ViewRoleRightPO,
	 *      ViewRoleRightQO)
	 */
	@Override
	public int updateSelective(ViewRoleRightPO entity, ViewRoleRightQO condition) {
		throw new java.lang.IllegalArgumentException(
				"updateSelective method not support for view object now!");
	}

	/**
	 * @see com.yjhl.framework.dao.AbstractDAO#updateMapByPk(Map,
	 *      ViewRoleRightPK)
	 */
	@Override
	public int updateMapByPk(Map<String, Object> entity,
			ViewRoleRightPK entitypk) {
		throw new java.lang.IllegalArgumentException(
				"update method not support for view object now!");
	}

	/**
	 * @see com.yjhl.framework.dao.AbstractDAO#updateMap(Map, ViewRoleRightQO)
	 */
	@Override
	public int updateMap(Map<String, Object> entity, ViewRoleRightQO condition) {
		throw new java.lang.IllegalArgumentException(
				"update method not support for view object now!");
	}

	/**
	 * @see com.yjhl.framework.dao.AbstractDAO#deleteByPk(ViewRoleRightPK)
	 */
	@Override
	public int deleteByPk(ViewRoleRightPK entitypk) {
		throw new java.lang.IllegalArgumentException(
				"deleteByPk method not support for view object now!");
	}

	/**
	 * @see com.yjhl.framework.dao.AbstractDAO#delete(ViewRoleRightQO)
	 */
	@Override
	public int delete(ViewRoleRightQO condition) {
		throw new java.lang.IllegalArgumentException(
				"delete method not support for view object now!");
	}

	/**
	 * @see ViewRoleRightDao#getByPk(String)
	 */
	public ViewRoleRightPO getByPk(String roleId) {
		ViewRoleRightPK entityPK = new ViewRoleRightPK(roleId);

		return super.getByPk(entityPK);
	}

}
